//
//  UIView+Tool.h
//  SLDemo
//
//  Created by bocai on 2016/12/2.
//  Copyright © 2016年 Heracles. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (Tool)

@property (class, readonly, nonatomic) NSString *t_nib;
@property (class, readonly, nonatomic) __kindof UIView *t_nibView;

@property (assign, nonatomic) CGFloat t_x;
@property (assign, nonatomic) CGFloat t_y;

@property (assign, nonatomic) CGFloat t_maxX;
@property (assign, nonatomic) CGFloat t_maxY;

@property (assign, nonatomic) CGFloat t_height;
@property (assign, nonatomic) CGFloat t_width;

@property (assign, nonatomic) CGPoint t_origin;
@property (assign, nonatomic) CGSize t_size;

@property (readonly, nonatomic) UIViewController *t_viewController;

- (void)t_addSubviews:(NSArray *)subviews;

- (void)t_filletWithHalfHeight;
- (void)t_filletWithHalfWidth;
- (void)t_filletWithRadius:(CGFloat)radius;

- (void)t_borderWithWidth:(CGFloat)width
                    color:(UIColor *)color;

- (void)t_addToWindow;

@end
